<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/fuman/js/oversea.js"></script>
<title>查看运输计划</title>
<body class="withvernav">
<div class="bodywrapper"> {{include file='/public/leftmenu.tpl'}}
  <div class="centercontent">
    <div class="pageheader notab">
      <h1 class="pagetitle">查看运输计划</h1>
      <span class="pagedesc"></span>
      <div class="menulist">
        <ul class="profile_summary">
          <li class="current"></li>
        </ul>
      </div>
    </div>
    <!--pageheader-->
    
    <div id="contentwrapper" class="contentwrapper">
      <div id="basicform" class="subcontent">
        <form class="stdform stdform2"  id="theFrom" method="post" action="/oversea/savecompare">
        
        	 <div class="contenttitle2">
            <h3>基本信息</h3>
          </div>
             <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
          
            <thead>
              <tr>
                <th class="head1">运输编号</th>
                <th class="head1">运输方式</th>
                <th class="head1">店铺</th>
                <th class="head1">始发地</th>
                <th class="head1">目的地</th>
                
               
              </tr>
            </thead>
            <tbody>
            
           
            <tr>
              <td class="head1">{{$detail.groupid}}</td>
              <td class="head0">{{$detail.transportmode}}</td>
              <td>{{$detail.shopname}}</td>
              <td class="center">{{$detail.startingplace}}</td>
              <td class="center">{{$detail.destination}}</td>
            </tr>
              </tbody>
            
          </table>
        
        
          <div class="contenttitle2">
            <h3>计划发货清单</h3>
          </div>
          <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
            <colgroup>
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
            </colgroup>
            <thead>
              <tr>
                <th class="head0">SKU</th>
                <th class="head1">商品名称</th>
                <th class="head0">重量 KG</th>
                <th class="head0">成本价</th>
                <th class="head0">计划发货数</th>
                <th class="head0">价格</th>
                <th class="head0">实封箱数</th>
                <th class="head0">未封箱数</th>
              </tr>
            </thead>
            <tbody>
            
            {{foreach from=$goodsdata item=li key=key}}
            <tr  {{if $li.st==1}}bgcolor="#FFD2D2" title="带商标商品"{{/if}}>
              <td>{{$li.sku}}</td>
              <td>{{$li.name}}</td>
              <td>{{$li.weight}}</td>
              <td class="center">{{$li.costprice}}</td>
              <td class="center">{{$li.sendnums}}</td>
              <td class="center">{{$li.totalprice}}</td>
              <td class="center">{{$li.shifa}}</td>
              <td class="center">{{$li.wfa}}</td>
            </tr>
            {{/foreach}}
              </tbody>
            
          </table>
          <div class="contenttitle2">
            <h3>合计信息</h3>
          </div>
          <div class="bq2 currentstatus marginbottom0"> SKU数 ：{{$detail.skunum}}个&nbsp;&nbsp;&nbsp;&nbsp;数量: {{$detail.totalnum}}&nbsp;&nbsp;&nbsp;&nbsp; 金额：{{$detail.totalamount}} 
            {{if $detail.boxlistcount>0}} <br>
            箱数：{{$detail.boxlistcount}}箱&nbsp;&nbsp;&nbsp;&nbsp;包装成本 {{$detail.boxlistcos}}&nbsp;&nbsp;&nbsp;&nbsp;
            {{/if}} </div>
            
             {{if $boxlistcount >0}}
          <div class="contenttitle2">
            <h3>箱子列表</h3>
          </div>
          <table cellpadding="0" cellspacing="0" border="0" class="stdtable" id="addTable" >
            <colgroup>
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
            </colgroup>
            <thead>
              <tr>
                <th class="head0">箱号</th>
                <th class="head1">装箱日期</th>
                <th class="head0">装箱人</th>
                <th class="head1">规格</th>
                 <th class="head1">SKU数</th>
                <th class="head1">总数量</th>
                 <th class="head1">成本</th>
                <th class="head1">重量</th>
                <th class="head1">运输状态</th>
                <th class="head1">运输编号</th>
                <th class="head1">编辑</th>
              </tr>
            </thead>
            <tbody>
            
            {{foreach from=$boxlist item=li key=key}}
            <tr>
              <td>{{$li.boxnumber}}
               </td>
              <td>{{$li.createtime}}</td>
              <td>{{$li.createname}}</td>
              <td class="center">{{$li.specifications}} </td>
               <td class="center">{{$li.sku}} </td>
            <td class="center"><input type="hidden" name="quantity[]" value="{{$li.quantity}}">{{$li.quantity}}</td>
             <td class="center"><input type="hidden" name="allprice[]" value="{{$li.allprice}}"><input type="hidden" name="cartonscost[]" value="{{$li.cartonscost}}">{{$li.allprice}}<input type="hidden" name="skunum[]" value="{{$li.sku}}"></td>
              <td class="center">{{$li.weight}}</td>
               <td class="center">{{if $li.taskstatus==0}}等待运输{{/if}}
               {{if $li.taskstatus==1}}新创建{{/if}}
        {{if $li.taskstatus==2}}已发运{{/if}}
        {{if $li.taskstatus==5}}运输完成{{/if}}
               </td>
                <td class="center">{{if $li.tasknumber==""}}等待运输{{else}}<a href="/oversea/showtask/{{$li.task_id}}" target="_blank"><font color="#0000FF">{{$li.tasknumber}}</font></a>{{/if}}</td>
               <td class="head1"><a href="/oversea/showbox/{{$li.id}}" target="_blank"><font color="#0000FF">查看</font></a> </td>
            </tr>
            {{/foreach}}
              </tbody>
            
            <tfoot>
            </tfoot>
          </table>
          {{/if}}
          
          
          {{if $statuslist}}
          <div class="contenttitle2">
            <h3>运输状态跟踪</h3>
          </div>
          <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
            <colgroup>
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
            </colgroup>
            <thead>
              <tr>
                <th class="head0">发货时间</th>
                <th class="head1">到货时间</th>
                <th class="head0">运费</th>
                <th class="head1">运费说明</th>
                <th class="head0">参考号</th>
                <th class="head0">承运人</th>
                <th class="head0">运输方式</th>
                <th class="head0">创建者</th>
                <th class="head0">创建时间</th>
                <th class="head0">操作</th>
              </tr>
            </thead>
            <tbody>
            
            {{foreach from=$statuslist item=li key=key}}
            <tr>
              <td>{{$li.projectdate}}</td>
              <td>{{$li.endprojectdate}}</td>
              <td>{{$li.freight}}</td>
              <td class="center">{{$li.projectdateremake}}</td>
              <td class="center">{{$li.ck}}</td>
              <td class="center">{{$li.carrier}}</td>
              <td class="center">{{$li.transportmode}}</td>
              <td class="center">{{$li.createUser}}</td>
              <td class="center">{{$li.instime}}</td>
              <td class="head0">{{if $detail.status !=5}} <a href="javascript:void(0)" onClick="ediplan({{$li.id}})"> 修改</a>｜<a href="javascript:void(0)" onClick="delstatuslist({{$li.id}},{{$detail.id}})">删除</a>{{/if}}</td>
            </tr>
            {{/foreach}}
              </tbody>
            
          </table>
          {{/if}}
         
           <div class="bq2 currentstatus marginbottom0"> 
            <input type="hidden" name="groupid" value="{{$detail.groupid}}">
            <input type="hidden" name="transportationplanning_id" value="{{$detail.id}}">
            <!-- <button type="submit" class="submit radius2" id="btn" >编辑</button>--> 
            {{if $detail.status==1 && $firsttrialman ==1}}
            <button type="button" onClick="changstatus(2,{{$detail.id}},1)" class="submit radius2" id="btn" >一审通过</button>
            <button type="button" onClick="askchangstatus(1,{{$detail.id}},1)" class="submit radius2" id="btn" >退回新创建</button>
            {{/if}}
            {{if $detail.status==2 && $secondtrialman ==1}}
            <button type="button" onClick="changstatus(3,{{$detail.id}},1)" class="submit radius2" id="btn" >二审通过</button>
            <button type="button" onClick="askchangstatus(1,{{$detail.id}},1)" class="submit radius2" id="btn" >退回新创建</button>
            {{/if}} 
            
         
            </div>
        </form>
        <br />
      </div>
      <!--subcontent--> 
      
      <!--subcontent--> 
      
    </div>
    <!--contentwrapper--> 
    
  </div>
  <!-- centercontent --> 
  
</div>

<!--添加退回原因-->
<form  method="post" id="modal_submit" action="#">
            <input type="hidden" name="ist" id="ist">
            <input type="hidden" name="isid" id="isid">
            <input type="hidden" name="istype" id="istype">
        <div class="modal fade" id="backtip" tabindex="-1" role="dialog" aria-labelledby="magentoauth" aria-hidden="true">
            <div class="modal-dialog" style="width:740px;">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"
                                aria-hidden="true">× </button>
                        <h4 class="modal-title" id="sebayauth">填写退回原因</h4>
                    </div>
                    <div class="modal-body">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td align="right">原因： </td>
                                <td align="left">
                                   <textarea name="back_message"  id="back_message" cols="10" rows=""> </textarea>
                                   </td>
                            </tr>
                        </table>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default"
                                    data-dismiss="modal"> 关闭 </button>
                            
                            <button type="button" class="btn btn-primary" onClick="actchangstatus()">确定退回</button>
                        </div>
                    </div>
                    <!-- /.modal-content -->
                </div>
                <!-- /.modal-dialog -->
            </div>
        </div>
        <!-- /.modal -->
    </form>



</body>
</html>